package model

import (
	"gorm.io/gorm"
	"time"
)

type BaseModel struct {
	ID        int32     `gorm:"primarykey;type:int" json:"ID"` //为什么使用int32, 就是为了兼容表字段类型
	CreatedAt time.Time `gorm:"column:add_time" json:"-"`
	UpdatedAt time.Time `gorm:"column:update_time" json:"-"`
	DeletedAt gorm.DeletedAt
	IsDeleted bool
}

type Brands struct {
	BaseModel
	Name string `gorm:"type:varchar(20);not null;default:''"`
	Logo string `gorm:"type:varchar(200);default:'';not null"`
}
